Dynomotion

Group: DynoMotion Message: 4247 From: namorkipast Date: 3/17/2012
Subject: Zero Fixture Offset in C code
Hello how zero curent Fixture Offset in C program?
Can you add execute GCode to "User buttons"?
Group: DynoMotion Message: 4248 From: himykabibble Date: 3/17/2012
Subject: Re: Zero Fixture Offset in C code
Fixture offsets don't exist in the DSP - they exist only in the G-code interpreter on the PC. So, there is no direct way to do that in the DSP. But, if you look at the KFlopToPCCmdExamples.c in the KMotion/C Programs directory, the MDI() function can be used to execute a G10L2 command to set fixture offsets for G54-59.

Regards,
Ray L.

--- In DynoMotion@yahoogroups.com, "namorkipast" <7380003@...> wrote:
>
> Hello how zero curent Fixture Offset in C program?
> Can you add execute GCode to "User buttons"?
>
Group: DynoMotion Message: 4249 From: namorkipast Date: 3/17/2012
Subject: Re: Zero Fixture Offset in C code
Thank you very much. It works :)
Next problem, how know curent Fixture Offset in C code?
I will be very grateful for the answer.
Group: DynoMotion Message: 4250 From: himykabibble Date: 3/18/2012
Subject: Re: Zero Fixture Offset in C code
Again, no direct way to do that. You could write an M-code handler, and pass it up to three of the current axis positions as the P, Q, R, parameters, and calculate the fixture offsets from that. The positions in the axis channel structure give you the machine coordinates. It would also require the DSP knowing the axis resolutions, which are available (see KFlopPCCmdExamples.c again for that).

Regards,
Ray L.

--- In DynoMotion@yahoogroups.com, "namorkipast" <7380003@...> wrote:
>
> Thank you very much. It works :)
> Next problem, how know curent Fixture Offset in C code?
> I will be very grateful for the answer.
>
Group: DynoMotion Message: 4251 From: Tom Kerekes Date: 3/18/2012
Subject: Re: Zero Fixture Offset in C code
Namorkipast,
 
The fixture offsets are stored in the Interpreter "Vars" which you can download to KFLOP.  The table below shows how the Var numbers are assigned.
 
Regards
TK
 
 
 
static
const int _required_parameters[] = {
5161, 5162, 5163, /* G28 home */
5164, 5165, 5166,
5181, 5182, 5183,
/* G30 home */
5184, 5185, 5186,
5211, 5212, 5213,
/* G92 offsets */
5214, 5215, 5216,
5220,
/* selected coordinate */
5221, 5222, 5223,
/* coordinate system 1 */
5224, 5225, 5226,
5241, 5242, 5243,
/* coordinate system 2 */
5244, 5245, 5246,
5261, 5262, 5263,
/* coordinate system 3 */
5264, 5265, 5266,
5281, 5282, 5283,
/* coordinate system 4 */
5284, 5285, 5286,
5301, 5302, 5303,
/* coordinate system 5 */
5304, 5305, 5306,
5321, 5322, 5323,
/* coordinate system 6 */
5324, 5325, 5326,
5341, 5342, 5343,
/* coordinate system 7 */
5344, 5345, 5346,
5361, 5362, 5363,
/* coordinate system 8 */
5364, 5365, 5366,
5381, 5382, 5383,
/* coordinate system 9 */
5384, 5385, 5386,
RS274NGC_MAX_PARAMETERS
};